package com.gitee.jmash.rbac.mapper;

import java.util.List;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
import com.crenjoy.proto.mapper.BeanMapper;
import com.crenjoy.proto.mapper.ProtoMapper;
import com.gitee.jmash.core.orm.DtoPage;
import com.gitee.jmash.core.orm.DtoTotal;
import com.gitee.jmash.rbac.entity.UserEntity;
import jmash.rbac.protobuf.OrganUserCreateReq;
import jmash.rbac.protobuf.UserCreateReq;
import jmash.rbac.protobuf.UserDeptJobInfoRes;
import jmash.rbac.protobuf.UserInfoPage;
import jmash.rbac.protobuf.UserModel;
import jmash.rbac.protobuf.UserPage;

/**
 * UserMapper.
 *
 * @author <a href="mailto:service@crenjoy.com">crenjoy</a>
 */
@Mapper
public interface UserMapper extends BeanMapper, ProtoMapper {

  UserMapper INSTANCE = Mappers.getMapper(UserMapper.class);


  List<UserModel> listUser(List<UserEntity> list);

  UserPage pageUser(DtoPage<UserEntity, DtoTotal> page);

  UserModel model(UserEntity entity);

  UserEntity create(UserCreateReq req);

  UserEntity create(OrganUserCreateReq req);

  UserEntity clone(UserEntity entity);

  UserDeptJobInfoRes modelUserDept(UserEntity enetity);

  UserInfoPage pageUserInfo(DtoPage<UserEntity, DtoTotal> page);

}
